package com.zian.domain.dto;

import com.zian.validation.ValidGroup;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

@Data
public class ShoppingDTO {

     @ApiModelProperty( "购物项主键id")
    @NotNull(message = "购物项主键id不能为空", groups = {ValidGroup.Crud.Update.class})
    private Long id;

     @ApiModelProperty( "关联商品id")
    @NotNull(message = "关联商品id不能为空")
    private Long goodsId;

     @ApiModelProperty( "数量(最大为5)")
    @Min(value = 1, message = "数量不能小于1")
    private Integer goodsCount = 1;

}
